package com.xixibaby.logistic;

import com.xixibaby.logistic.service.LogisticQueryService;
import com.xixibaby.logistic.service.LogisticQueryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tomj
 */
@Configuration
@EnableConfigurationProperties(KuaiDi100Config.class)
public class LogisticAutoConfiguration {
    @Autowired
    private KuaiDi100Config kuaiDi100Config;

    @Bean
    public KuaiDi100Kit kuaiDi100Kit(){
        KuaiDi100Kit kuaiDi100Kit = new KuaiDi100Kit();
        kuaiDi100Kit.setConfig(kuaiDi100Config);
        return kuaiDi100Kit;
    }

    @Bean
    public LogisticQueryService logisticQueryService(){
        return new LogisticQueryServiceImpl();
    }

}
